import { createStore } from 'vuex'

// 导入模块数据
import user from './modules/user'
import category from './modules/category.js'
import cart from './modules/cart.js'

// 导入数据持久化
import createPersistedstate from 'vuex-persistedstate'
// import * as Cookies from 'js-cookie'
export default createStore({
  state: {
  },
  getters: {
  },
  mutations: {
  },
  actions: {
  },
  modules: {
    user,
    category,
    cart
  },
  plugins: [
    createPersistedstate({
      key: 'rabbit-vue3',
      paths: ['user', 'cart']
    })
  ]
})
